#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_onAndOff_clicked()
{
    if(ui->onAndOff->text() == "ON")
    {
        ui->onAndOff->setText("OFF");
    }
    else
    {
        ui->onAndOff->setText("ON");
    }
}

void Widget::on_changeTitle_clicked()
{
    this->setWindowTitle("my title");
}

void Widget::on_closeWindow_clicked()
{
    this->close();
}
